<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link class="include" type="text/css" rel="stylesheet" href="/bigjo/css/jquery.jqplot.css">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<script type="text/javascript" src="/bigjo/js/jquery.jqplot.js"></script>
<script type="text/javascript" src="/bigjo/js/jqplot.canvasAxisTickRenderer.js"></script>
<script type="text/javascript" src="/bigjo/js/jqplot.barRenderer.js"></script>
<script type="text/javascript" src="/bigjo/js/jqplot.categoryAxisRenderer.js"></script>
<script type="text/javascript" src="/bigjo/js/jqplot.pointLabels.js"></script>
<title>Insert title here</title>
<style type="text/css">
table.jqplot-legend {
	width: auto;
	height: auto;
}
</style>
<c:set value="${seoulChart.musicbean.ms_title}" var="title"></c:set>
<c:set value="${seoulChart.arealikebean.a_count}" var="count"></c:set>
<script type="text/javascript">
	$(document).ready(function() {
		var title = new Array();
		var count = new Array();
		for(var i = 0; i < 10; i++){
			count[i] = $(".test"+i).val();
			title[i] = $(".test"+i).attr("id");
			if(count[i] == null && title[i] == null){
				if(count[i] == "" && title[i] == ""){
					break;
				}
			}
		}
		$.jqplot.config.enablePlugins = true;
			plot2 = $.jqplot('chart2', [count], {
				animate: !$.jqplot.use_excanvas,
				seriesDefaults : {
					renderer : $.jqplot.BarRenderer,
					pointLabels : {show : true}
				},
				axes : {
					xaxis : {
						renderer : $.jqplot.CategoryAxisRenderer,
						ticks : title,
						tickOptions:{
							angle:30,
							formatString:'%b'
						},
					},
					yaxis : {
						min:0,
						max:500,
						tickOptions:{formatString: "%d"}
					}			
				},
				highlighter: { show: false }
			}); 
		});
</script>
</head>
<body>
	<div id="chart2" class="chart2"></div>
	<%int i = 0; %>
	<c:forEach items="${dejunchart}" var="dejunchart">
		<input type="hidden" class="test<%=i%>" id="${dejunchart.musicbean.ms_title}" value="${dejunchart.arealikebean.a_count}">
		<input type="hidden" value="<%=i++ %>">
	</c:forEach>
	
</body>
</html>